﻿
#include "dialog.h"
#include "flowingRayButton.h"
#include "hoveringRippleButton.h"
#pragma execution_character_set("utf-8")
Dialog::Dialog(QWidget *parent)
    : QDialog(parent)
{
    //隐藏最大化按钮|置顶
    setWindowFlags(this->windowFlags()& ~Qt::WindowMaximizeButtonHint|Qt::WindowStaysOnTopHint);
    this->resize(800, 800);
    this->setStyleSheet("background:#000000");
    // 流动光线按钮
    FlowingRayButton *a1 = new FlowingRayButton(this);
    a1->setGeometry(QRect(200, 100, 440, 140));
    a1->setBorder(6);

    auto w =new QWidget(this);
    w->setGeometry(0,270,this->width(),this->height());
    w->setStyleSheet("background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #00bd39, "
                     "stop:0.1 #00b844, stop:0.2 #00b44f, stop:0.3 #00af59, stop:0.4 #00aa64, "
                     "stop:0.5 #01a66f, stop:0.6 #01a17a, stop:0.7 #019c84, stop:0.8 #01988f, "
                     "stop:0.9 #01939a);");

    FlowingRayButton *a2 = new FlowingRayButton(this);
    a2->setGeometry(QRect(200, 300, 440, 140));

    /* Rborder-width 是一个自定义的属性，它不是官方的 CSS 属性;
     * Rborder-width 用于样式表中不会产生任何影响。可以忽略警告Unknown property Rborder-width*/
    a2->setStyleSheet("QFrame{"
                      "	background-color: rgba(255, 255, 255,255);"
                      "	border:none;"
                      "	border-radius:10px;"
                      " Rborder-width:10px;"
                      "}"
                      "QPushButton{border-radius: 15px;color:#ffffff;}"
                      );

    a2->setStyleSheetConfig();


    new HoveringRippleButton(this,QRect(200, 500, 440, 140), QSize(440, 140));
}

Dialog::~Dialog()
{
}


